﻿@model IEnumerable<wh40klbWeb.Models.InfantryViewModel>
<p>
    @Html.ActionLink("Create New", "Create", new { id = ViewBag.armyId })
</p>
@if (Model.Count() > 0)
{
    <table>
        <tr>
            <th>
                Nom
            </th>
            <th>
                Cc
            </th>
            <th>
                Ct
            </th>
            <th>
                F
            </th>
            <th>
                E
            </th>
            <th>
                Pv
            </th>
            <th>
                I
            </th>
            <th>
                A
            </th>
            <th>
                Cmd
            </th>
            <th>
                Sauvegarde
            </th>
            <th>
                Description
            </th>
            <th>
            </th>
        </tr>
        @foreach (var item in Model)
        {
            <tr  class=@item.SquadType >
                <td>
                    @Html.ActionLink(item.Name, "Details", new { id = item.Id })
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.WeaponSkill)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.BallisticSkill)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Strengh)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Thoughness)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Wounds)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Initiative)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Attack)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Leadership)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.ArmorSave)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Description)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |                    
                    @Html.ActionLink("Delete", "Delete", new { id = item.Id })
                </td>
            </tr>

        }
    </table>
}
